From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0001.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0001.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0001.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 13 15:21:14 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 15:21:14 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0002.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 15:21:14 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0002.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 15:21:14 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0002.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:14 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:15 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 13 15:21:15 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 15:21:15 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:15 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 13 15:21:15 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 13 15:21:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:15 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 13 15:21:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 13 16:00:47 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 16:00:47 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0003.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 16:00:47 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0003.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 16:00:47 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0003.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:47 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:47 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 13 16:00:48 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 16:00:48 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:48 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 13 16:00:48 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 13 16:00:48 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:48 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:48 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 13 16:00:48 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:48 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 13 20:01:36 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 20:01:36 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0004.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 20:01:36 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0004.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 13 20:01:36 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0004.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:37 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:37 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 13 20:01:37 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 20:01:37 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:37 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 13 20:01:37 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 13 20:01:37 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:37 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:37 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 13 20:01:37 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:37 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0005.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0005.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0005.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0006.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0006.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0006.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:44 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0007.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0007.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0007.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0008.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0008.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0008.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0009.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0009.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0009.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0010.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0010.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0010.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0011.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0011.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0011.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Jan 15 20:00:39 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 15 20:00:39 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0012.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 15 20:00:39 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0012.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 15 20:00:39 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0012.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:40 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:40 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Jan 15 20:00:40 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 20:00:40 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:40 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Jan 15 20:00:40 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 15 20:00:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:40 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 15 20:00:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Jan 16 08:02:28 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 16 08:02:28 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0013.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 16 08:02:28 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0013.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 16 08:02:28 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0013.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:28 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:28 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Jan 16 08:02:28 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 08:02:28 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:28 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Jan 16 08:02:28 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 16 08:02:28 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:29 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:29 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 16 08:02:29 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:29 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0014.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0014.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0014.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:47 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0015.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0015.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0015.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:47 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Jan 16 20:00:42 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0016.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0016.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0016.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Jan 17 08:02:30 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0017.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0017.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0017.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:31 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Jan 17 12:01:00 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 17 12:01:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0018.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 17 12:01:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0018.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 17 12:01:00 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0018.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:00 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:00 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Jan 17 12:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 12:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Jan 17 12:01:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 17 12:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:01 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 17 12:01:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0019.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0019.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0019.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:48 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Jan 17 20:00:50 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 17 20:00:50 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0020.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0020.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0020.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Jan 18 08:04:14 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0021.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0021.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0021.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0022.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0022.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0022.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Jan 18 16:01:25 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0023.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0023.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0023.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:26 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Jan 18 20:00:52 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 18 20:00:52 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0024.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0024.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0024.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Jan 19 08:04:34 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0025.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0025.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0025.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:35 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0026.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0026.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0026.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:58 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Jan 19 16:02:49 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 19 16:02:50 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0027.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 19 16:02:50 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0027.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 19 16:02:50 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0027.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:50 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:50 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Jan 19 16:02:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 16:02:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Jan 19 16:02:50 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 19 16:02:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:51 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 19 16:02:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Jan 19 20:00:46 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 19 20:00:46 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0028.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 19 20:00:46 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0028.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 19 20:00:46 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0028.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:46 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:46 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Jan 19 20:00:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 20:00:48 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:48 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Jan 19 20:00:48 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 19 20:00:48 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:48 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:48 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 19 20:00:48 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:48 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 20 08:06:38 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 20 08:06:41 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0029.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 20 08:06:41 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0029.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 20 08:06:41 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0029.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:41 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:41 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 20 08:06:41 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 08:06:41 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:41 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 20 08:06:41 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 20 08:06:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:41 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 20 08:06:42 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:42 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 20 12:01:59 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 20 12:01:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0030.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 20 12:01:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0030.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 20 12:01:59 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0030.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:59 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:59 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 20 12:01:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 12:02:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 20 12:02:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 20 12:02:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 20 12:02:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0031.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0031.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0031.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 20 20:00:45 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 20 20:00:45 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0032.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 20 20:00:45 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0032.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 20 20:00:46 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0032.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:46 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:46 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 20 20:00:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 20:00:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 20 20:00:46 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 20 20:00:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:46 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 20 20:00:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0033.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0033.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0033.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:49 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0034.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0034.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0034.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Jan 21 16:00:50 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 21 16:00:50 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0035.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 21 16:00:50 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0035.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 21 16:00:50 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0035.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:51 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:51 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Jan 21 16:00:51 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 16:00:51 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:51 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Jan 21 16:00:51 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 21 16:00:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:51 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 21 16:00:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0036.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0036.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0036.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:49 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0037.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0037.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0037.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0038.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0038.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0038.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 22 12:00:49 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0039.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0039.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0039.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 22 16:01:18 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0040.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0040.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0040.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:13 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Jan 23 08:02:39 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0041.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0041.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0041.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0042.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0042.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0042.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:55 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Jan 23 16:01:42 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0043.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0043.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0043.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0044.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0044.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0044.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Jan 24 08:03:05 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 24 08:03:05 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0045.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0045.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0045.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Jan 24 12:02:48 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 24 12:02:48 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0046.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 24 12:02:49 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0046.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 24 12:02:49 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0046.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:49 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:49 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Jan 24 12:02:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 12:02:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Jan 24 12:02:49 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 24 12:02:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:50 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 24 12:02:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:50 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0047.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0047.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0047.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Jan 24 20:01:50 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 24 20:01:50 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0048.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 24 20:01:50 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0048.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 24 20:01:50 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0048.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:50 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:50 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Jan 24 20:01:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 20:01:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Jan 24 20:01:51 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 24 20:01:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:53 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 24 20:01:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Jan 25 08:01:59 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0049.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0049.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0049.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Jan 25 12:01:00 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 25 12:01:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0050.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 25 12:01:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0050.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 25 12:01:00 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0050.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:00 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:00 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Jan 25 12:01:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 12:01:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Jan 25 12:01:01 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 25 12:01:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:01 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 25 12:01:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0051.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0051.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0051.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0052.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0052.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0052.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Jan 26 08:05:32 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 26 08:05:36 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0053.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 26 08:05:36 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0053.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 26 08:05:36 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0053.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:36 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:36 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Jan 26 08:05:37 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 08:05:38 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:38 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Jan 26 08:05:38 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 26 08:05:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:38 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 26 08:05:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Jan 26 12:01:04 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 26 12:01:04 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0054.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 26 12:01:04 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0054.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 26 12:01:05 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0054.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:05 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:05 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Jan 26 12:01:05 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 12:01:05 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:05 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Jan 26 12:01:05 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 26 12:01:05 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:05 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:05 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 26 12:01:05 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:05 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0055.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0055.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0055.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0056.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0056.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0056.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 27 08:06:29 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 27 08:06:31 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0057.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 27 08:06:32 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0057.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 27 08:06:33 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0057.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:33 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:33 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 27 08:06:33 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 08:06:33 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:33 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 27 08:06:33 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 27 08:06:33 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:33 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:33 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 27 08:06:33 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:33 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 27 12:02:06 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 27 12:02:07 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0058.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 27 12:02:07 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0058.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 27 12:02:07 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0058.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:07 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:07 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 27 12:02:07 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 12:02:07 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:08 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 27 12:02:08 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 27 12:02:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:08 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 27 12:02:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0059.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0059.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0059.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0060.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0060.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0060.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:54 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Jan 28 08:05:31 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 28 08:05:32 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0061.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 28 08:05:33 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0061.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 28 08:05:33 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0061.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:33 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:33 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Jan 28 08:05:33 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 08:05:34 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:34 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Jan 28 08:05:34 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 28 08:05:34 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:34 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:34 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 28 08:05:34 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:34 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0062.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0062.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0062.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Jan 28 16:00:53 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 28 16:00:53 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0063.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 28 16:00:53 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0063.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 28 16:00:53 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0063.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:53 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:53 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Jan 28 16:00:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 16:00:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:54 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Jan 28 16:00:54 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 28 16:00:54 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:54 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:54 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 28 16:00:54 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:54 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Jan 28 20:00:52 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0064.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0064.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0064.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Jan 29 08:07:26 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 29 08:07:26 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0065.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0065.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0065.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:27 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0066.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0066.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0066.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0067.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0067.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0067.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0068.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0068.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0068.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:54 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Jan 30 08:08:24 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 30 08:08:31 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0069.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0069.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0069.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:08:35 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Jan 30 12:03:50 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 30 12:03:51 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0070.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0070.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0070.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Jan 30 16:04:04 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 30 16:04:05 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0071.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 30 16:04:05 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0071.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 30 16:04:05 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0071.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:05 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:05 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Jan 30 16:04:06 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 16:04:06 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:06 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Jan 30 16:04:06 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 30 16:04:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:06 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 30 16:04:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Jan 30 20:02:08 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 30 20:02:09 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0072.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0072.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0072.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Jan 31 08:07:44 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 31 08:07:45 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0073.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 31 08:07:46 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0073.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 31 08:07:46 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0073.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:46 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:46 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Jan 31 08:07:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 08:07:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Jan 31 08:07:46 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 31 08:07:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:46 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 31 08:07:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:47 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Jan 31 12:04:11 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 31 12:04:13 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0074.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0074.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0074.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:14 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Jan 31 16:02:13 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 31 16:02:14 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0075.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 31 16:02:14 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0075.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 31 16:02:14 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0075.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:14 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:14 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Jan 31 16:02:14 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 16:02:14 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:15 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Jan 31 16:02:15 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 31 16:02:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:15 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 31 16:02:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Jan 31 20:01:06 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0076.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0076.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0076.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:07 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 1 08:09:25 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 1 08:09:26 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0077.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 1 08:09:29 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0077.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 1 08:09:29 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0077.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:29 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:29 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 1 08:09:29 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 08:09:30 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:30 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 1 08:09:30 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 1 08:09:30 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:30 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:30 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 1 08:09:30 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:30 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 1 12:02:39 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0078.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0078.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0078.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 1 12:02:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 1 16:01:02 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 1 16:01:02 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0079.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 1 16:01:02 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0079.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 1 16:01:02 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0079.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:02 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:02 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 1 16:01:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 16:01:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 1 16:01:04 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 1 16:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:04 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 1 16:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0080.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0080.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0080.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Feb 2 08:12:04 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 2 08:12:10 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0081.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 2 08:12:15 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0081.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 2 08:12:15 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0081.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:15 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:15 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Feb 2 08:12:16 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 08:12:16 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:16 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Feb 2 08:12:16 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 2 08:12:16 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:16 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:17 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 2 08:12:17 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:17 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Feb 2 12:02:44 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 2 12:02:45 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0082.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0082.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0082.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:46 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0083.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0083.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0083.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Feb 2 20:00:59 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 2 20:00:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0084.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 2 20:00:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0084.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 2 20:00:59 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0084.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:59 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:59 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Feb 2 20:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 20:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Feb 2 20:00:59 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 2 20:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 2 20:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Feb 3 08:11:46 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 3 08:11:51 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0085.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 3 08:11:54 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0085.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 3 08:11:54 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0085.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:11:54 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:11:54 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Feb 3 08:11:55 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 08:11:55 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:11:55 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Feb 3 08:11:55 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 3 08:11:55 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:11:55 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:11:55 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 3 08:11:56 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:11:56 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Feb 3 12:02:33 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 3 12:02:37 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0086.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 3 12:02:37 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0086.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 3 12:02:37 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0086.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:37 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:37 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Feb 3 12:02:37 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 12:02:38 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:38 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Feb 3 12:02:38 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 3 12:02:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:38 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 3 12:02:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Feb 3 16:00:59 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 3 16:00:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0087.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 3 16:00:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0087.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 3 16:00:59 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0087.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:59 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:00 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Feb 3 16:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 16:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Feb 3 16:01:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 3 16:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 3 16:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0088.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0088.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0088.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:05 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Feb 4 08:07:33 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 4 08:07:41 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0089.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 4 08:07:44 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0089.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 4 08:07:45 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0089.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:07:45 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:07:45 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Feb 4 08:07:45 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 08:07:45 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:07:45 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Feb 4 08:07:45 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 4 08:07:45 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:07:45 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:07:45 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 4 08:07:45 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:07:45 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Feb 4 12:02:38 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 4 12:02:40 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0090.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0090.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0090.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0091.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0091.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0091.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 4 16:01:11 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:12 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0092.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0092.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0092.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 4 20:01:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Feb 5 08:07:49 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 5 08:07:52 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0093.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0093.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0093.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:53 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Feb 5 12:02:38 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0094.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0094.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0094.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 5 12:02:40 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Feb 5 16:01:05 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 5 16:01:05 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0095.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 5 16:01:05 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0095.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 5 16:01:05 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0095.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:05 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:05 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Feb 5 16:01:05 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 16:01:05 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:05 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Feb 5 16:01:05 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 5 16:01:05 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:06 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 5 16:01:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:06 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0096.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0096.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0096.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:58 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Feb 6 08:14:02 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 6 08:14:15 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0097.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 6 08:14:25 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0097.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 6 08:14:25 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0097.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:14:25 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:14:25 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Feb 6 08:14:26 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 08:14:26 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:14:26 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Feb 6 08:14:26 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 6 08:14:26 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:14:26 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:14:26 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 6 08:14:26 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:14:26 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Feb 6 12:02:36 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 6 12:02:37 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0098.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0098.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0098.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0099.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0099.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0099.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0100.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0100.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0100.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Feb 7 08:21:54 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 7 08:22:18 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0101.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 7 08:22:35 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0101.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 7 08:22:36 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0101.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:22:37 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:22:37 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Feb 7 08:22:38 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 08:22:38 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:22:38 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Feb 7 08:22:38 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 7 08:22:38 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:22:39 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:22:39 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 7 08:22:39 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:22:39 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Feb 7 12:03:12 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 7 12:03:13 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0102.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 7 12:03:14 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0102.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 7 12:03:14 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0102.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:14 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:14 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Feb 7 12:03:14 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 12:03:14 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:14 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Feb 7 12:03:15 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 7 12:03:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:15 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 7 12:03:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Feb 7 16:01:07 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 7 16:01:07 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0103.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 7 16:01:07 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0103.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 7 16:01:07 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0103.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:07 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:07 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Feb 7 16:01:07 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 16:01:07 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:07 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Feb 7 16:01:07 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 7 16:01:07 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:07 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:08 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 7 16:01:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Feb 7 20:01:02 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 7 20:01:02 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0104.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 7 20:01:02 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0104.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 7 20:01:02 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0104.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:02 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:02 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Feb 7 20:01:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 20:01:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:03 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Feb 7 20:01:03 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 7 20:01:03 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:03 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:03 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 7 20:01:03 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:03 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 8 08:21:39 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 8 08:21:50 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0105.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 8 08:21:56 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0105.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 8 08:21:57 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0105.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:21:57 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:21:57 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 8 08:21:57 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 08:21:57 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:21:57 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 8 08:21:57 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 8 08:21:57 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:21:57 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:21:57 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 8 08:21:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:21:59 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 8 12:03:14 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 8 12:03:17 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0106.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0106.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0106.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0107.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0107.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0107.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:13 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 8 20:01:02 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 8 20:01:02 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0108.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 8 20:01:02 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0108.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 8 20:01:02 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0108.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:02 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:02 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 8 20:01:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 20:01:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 8 20:01:02 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 8 20:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:04 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 8 20:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Feb 9 08:08:52 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 9 08:08:57 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0109.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 9 08:09:01 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0109.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 9 08:09:02 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0109.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:02 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:03 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Feb 9 08:09:03 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 08:09:03 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:03 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Feb 9 08:09:03 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 9 08:09:03 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:04 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 9 08:09:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Feb 9 12:02:53 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 9 12:02:57 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0110.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 9 12:03:01 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0110.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 9 12:03:01 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0110.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:01 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:01 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Feb 9 12:03:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 12:03:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Feb 9 12:03:02 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 9 12:03:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:02 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 9 12:03:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Feb 9 16:01:14 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 9 16:01:14 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0111.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 9 16:01:14 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0111.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 9 16:01:14 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0111.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:14 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:14 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Feb 9 16:01:14 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 16:01:14 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:14 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Feb 9 16:01:14 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 9 16:01:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:15 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 9 16:01:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:15 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0112.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0112.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0112.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:07 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Feb 10 08:18:53 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 10 08:19:09 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0113.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 10 08:19:21 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0113.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 10 08:19:23 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0113.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:19:23 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:19:23 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Feb 10 08:19:23 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 08:19:23 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:19:24 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Feb 10 08:19:24 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 10 08:19:24 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:19:24 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:19:24 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 10 08:19:24 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:19:24 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Feb 10 12:03:30 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 10 12:03:32 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0114.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 10 12:03:33 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0114.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 10 12:03:34 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0114.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:34 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:34 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Feb 10 12:03:34 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 12:03:34 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:34 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Feb 10 12:03:34 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 10 12:03:34 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:34 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:34 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 10 12:03:34 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:34 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Feb 10 16:01:05 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 10 16:01:05 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0115.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 10 16:01:05 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0115.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 10 16:01:05 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0115.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:05 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:05 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Feb 10 16:01:08 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 16:01:08 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:08 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Feb 10 16:01:08 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 10 16:01:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:08 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 10 16:01:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Feb 10 20:01:11 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 10 20:01:11 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0116.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 10 20:01:11 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0116.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Feb 10 20:01:11 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0116.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:11 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:11 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Feb 10 20:01:11 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 20:01:11 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:11 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Feb 10 20:01:12 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 10 20:01:12 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:12 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:12 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Feb 10 20:01:12 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:12 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Feb 11 08:12:37 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 11 08:12:40 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0117.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 11 08:12:42 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0117.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 11 08:12:42 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0117.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:43 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:43 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Feb 11 08:12:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 08:12:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:43 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Feb 11 08:12:43 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 11 08:12:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:43 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 11 08:12:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:43 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Feb 11 12:02:32 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 11 12:02:35 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0118.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0118.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0118.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:36 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0119.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0119.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0119.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:03 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0120.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0120.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0120.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:56 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Feb 12 08:09:02 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 12 08:09:06 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0121.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 12 08:09:09 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0121.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 12 08:09:09 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0121.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:09 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:09 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Feb 12 08:09:09 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 08:09:09 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:09 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Feb 12 08:09:10 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 12 08:09:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:10 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 12 08:09:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Feb 12 12:02:41 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 12 12:02:43 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0122.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0122.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0122.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:44 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Feb 12 16:01:07 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 12 16:01:07 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0123.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0123.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0123.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:08 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Sun Feb 12 20:00:59 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0124.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0124.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0124.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Feb 13 08:16:31 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 13 08:16:37 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0125.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 13 08:16:40 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0125.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 13 08:16:41 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0125.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:16:41 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:16:41 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Feb 13 08:16:41 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 08:16:41 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:16:41 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Feb 13 08:16:41 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 13 08:16:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:16:41 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:16:41 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 13 08:16:42 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:16:42 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Feb 13 12:02:59 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 13 12:03:01 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0126.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0126.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0126.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:02 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0127.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0127.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0127.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:22 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0128.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0128.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0128.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Mon Feb 13 20:01:00 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:04 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Feb 14 08:18:41 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 14 08:18:53 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0129.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 14 08:19:00 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0129.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 14 08:19:01 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0129.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:01 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:01 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Feb 14 08:19:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 08:19:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Feb 14 08:19:01 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 14 08:19:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:01 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 14 08:19:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Feb 14 12:03:15 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 14 12:03:16 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0130.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0130.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0130.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0131.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0131.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0131.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:30 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0132.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0132.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0132.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:10 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 15 08:26:26 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 08:26:40 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0133.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 08:26:55 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0133.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 08:26:56 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0133.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:26:57 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:26:57 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 15 08:26:57 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 08:26:57 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:26:57 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 15 08:26:57 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 15 08:26:57 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:26:58 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:26:58 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 15 08:26:58 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:26:58 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 15 12:05:12 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 12:05:14 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0134.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0134.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0134.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:22 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 15 16:01:29 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 16:01:29 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0135.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0135.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0135.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:30 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0136.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0136.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0136.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:01 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Wed Feb 15 20:13:04 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 20:13:12 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0137.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 20:13:18 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0137.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Wed Feb 15 20:13:19 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0137.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:19 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:19 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Wed Feb 15 20:13:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 20:13:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:19 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Wed Feb 15 20:13:19 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 15 20:13:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:19 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Wed Feb 15 20:13:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:19 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Thu Feb 16 08:45:17 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 16 08:45:39 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0138.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 16 08:45:47 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0138.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Thu Feb 16 08:45:48 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0138.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:45:49 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:45:49 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Thu Feb 16 08:45:49 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 16 08:45:50 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:45:51 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Thu Feb 16 08:45:51 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 16 08:45:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:45:51 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:45:52 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Thu Feb 16 08:45:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:45:52 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From teyc at cognoware.com Mon Sep 8 10:31:49 2003 From: teyc at cognoware.com (Chui Tey) Date: Fri Mar 31 16:33:31 2006 Subject: [egenix-users] mxODBCZope locking Message-ID: <007501c37598$36737180$3e0a37cb@advdata.com.au> Hi, We are experiencing serious locking problems with using the mxODBCZopeDA in conjunction with SQL Server 2000 when executing complex business logic. The problem is not exhibited with the free but slow ZODBCDA. The sequence is: Zope : tpc_begin ZopeMxODBC: tpc_begin (guessing only) ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) SET LOCATIONNAME = 'STREET' WHERE LOCATIONTYPE = 1234 ZopeMxODBC: more INSERTS, UPDATES ... AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 (this is blocked by ZopeMxODBC) Zope : tpc_finish (no error) AnotherApp: (blocked until times out) ZopMxODBC : still holds locks on the table until Zope is shut down ZopeMxODBC has failed to commit or rollback. Consequently, database locks is held indefinitely by ZopeMxODBC We have set connection pooling to 1. However, the problem still occurs. Does anybody have any suggestions? We have switched back to using ZODBCDA. If we can't solve this we will have to consider writing our own database adapter. Chui Tey Software Engineer Advanced Data Integration From james at digconn.co.uk Fri Sep 12 09:01:23 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Mar 31 16:33:33 2006 Subject: [egenix-users] installing mxdatetime Message-ID: hello i'm kinda new to linux and need to install the egenix mx base file onto my machine. It's in an rpm format but i don't know how to install it onto my machine can someone help please -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/9e7816f7/attachment-0139.htm From james at digconn.co.uk Fri Sep 12 09:07:12 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Mar 31 16:33:35 2006 Subject: [egenix-users] installing mxdatetime Message-ID: <0003F838.3F618CC0@ext1.sterling2000.co.uk> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 0 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20030912/8f123290/attachment-0139.obj From james at digconn.co.uk Fri Sep 12 09:17:09 2003 From: james at digconn.co.uk (james@digconn.co.uk) Date: Fri Mar 31 16:33:36 2006 Subject: [egenix-users] lemburg Message-ID: when trying to install the software after fiddling around with it for a bit i tried rpm -i egenix****** however a message came up saying user lemburg does not exist -using root what's going on? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20030912/daa03b47/attachment-0139.htm From mal at lemburg.com Mon Sep 15 11:22:21 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:36 2006 Subject: [egenix-users] mxODBCZope locking In-Reply-To: <007501c37598$36737180$3e0a37cb@advdata.com.au> References: <007501c37598$36737180$3e0a37cb@advdata.com.au> Message-ID: <3F6576BD.3060904@lemburg.com> Chui Tey wrote: > Hi, > > We are experiencing serious locking problems with using > the mxODBCZopeDA in conjunction with SQL Server 2000 > when executing complex business logic. > > The problem is not exhibited with the free but slow ZODBCDA. > > The sequence is: > > Zope : tpc_begin Are you calling the transaction logic outside the standard Zope request handler ? > ZopeMxODBC: tpc_begin (guessing only) > ZopeMxODBC: UPDATE TABLEB (LOCATION, LOCATIONTYPE) > SET LOCATIONNAME = 'STREET' > WHERE LOCATIONTYPE = 1234 Depending on the settings you are using for transaction isolation, this will cause an implicit row lock. > ZopeMxODBC: more INSERTS, UPDATES ... > AnotherApp: select from TABLEB where TABLEB.LOCATIONTYPE = 1234 > (this is blocked by ZopeMxODBC) > Zope : tpc_finish (no error) If you are calling tpc_finish without first calling tpc_vote, the DA will not be asked to finish up by Zope and either rollback or commit the transaction. See the code in ./lib/python/Shared/DC/ZRDB/TM.py for details. > AnotherApp: (blocked until times out) > ZopMxODBC : still holds locks on the table until Zope is shut down > > ZopeMxODBC has failed to commit or rollback. Consequently, database locks is > held > indefinitely by ZopeMxODBC > > We have set connection pooling to 1. However, the > problem still occurs. Side note: you should switch off connection pooling in the MS ODBC manager and enable connection pooling in the Zope DA instead to avoid problems. > Does anybody have any suggestions? > > We have switched back to using ZODBCDA. If we can't solve this we > will have to consider writing our own database adapter. > > Chui Tey > Software Engineer > Advanced Data Integration -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Mon Sep 15 12:13:09 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:36 2006 Subject: [egenix-users] lemburg In-Reply-To: References: Message-ID: <3F6582A5.2090208@lemburg.com> james@digconn.co.uk wrote: > when trying to install the software after fiddling around with it for a bit i tried > rpm -i egenix****** > however a message came up saying > user lemburg does not exist -using root > what's going on? That's normal, since the build process builds the RPMs under the lemburg user account. Nothing to worry about. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 15 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From python at sarcastic-horse.com Wed Sep 17 13:04:19 2003 From: python at sarcastic-horse.com (python@sarcastic-horse.com) Date: Fri Mar 31 16:33:36 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" Message-ID: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime class xLabeller: def __init__(self, firstdate,fmt='%B, %Y'): self.firstdate = firstdate self.fmt = fmt self.mm = mx.DateTime.RelativeDateTime(months=1) def __call__(self, i): dt = self.firstdate + self.mm * int(i) return dt.Format(self.fmt) nov99 = mx.DateTime.Date(int(1999), int(11)) xl = xLabeller(nov99) print "xl2:" print xl(int(3)) Produces this warning: >>> ================================ RESTART =========== >>> xl2: C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: DeprecationWarning: integer argument expected, got float return DateTime(year, month, 1) + \ February, 2000 What is the story? I've wrapped every number in my program with int(). I can't figure out what's triggering the warning. And, even stranger, the whole thing works fine at the python shell: >>> import mx.DateTime >>> mm = mx.DateTime.RelativeDateTime(months=1) >>> nov99 >>> dt = nov99 + mm * 3 >>> dt.Format('%b, %y') 'Feb, 00' >>> What am I doing wrong? Thanks for the help. From Jim.Vickroy at noaa.gov Wed Sep 17 11:59:54 2003 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Mar 31 16:33:36 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> Message-ID: <3F68930A.CD2E4C63@noaa.gov> I do not have an explanation, but the statement: dt = self.firstdate + self.mm * int(i) appears to be the source of this warning. The warning only appears the first time the statement is executed; thereafter, no warning is issued. python@sarcastic-horse.com wrote: > Hi- > > I'm getting a "DeprecationWarning: integer argument expected, got float" > warning with mx.DateTime and I can't figure out why. Can anyone help me > out? > > This code: > > import mx.DateTime > > class xLabeller: > def __init__(self, firstdate,fmt='%B, %Y'): > self.firstdate = firstdate > self.fmt = fmt > self.mm = mx.DateTime.RelativeDateTime(months=1) > def __call__(self, i): > dt = self.firstdate + self.mm * int(i) > return dt.Format(self.fmt) > > nov99 = mx.DateTime.Date(int(1999), int(11)) > > xl = xLabeller(nov99) > print "xl2:" > print xl(int(3)) > > Produces this warning: > > >>> ================================ RESTART =========== > >>> > xl2: > C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: > DeprecationWarning: integer argument expected, got float > return DateTime(year, month, 1) + \ > February, 2000 > > What is the story? I've wrapped every number in my program with int(). I > can't figure out what's triggering the warning. > > And, even stranger, the whole thing works fine at the python shell: > > >>> import mx.DateTime > >>> mm = mx.DateTime.RelativeDateTime(months=1) > >>> nov99 > > >>> dt = nov99 + mm * 3 > >>> dt.Format('%b, %y') > 'Feb, 00' > >>> > > What am I doing wrong? > > Thanks for the help. > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Wed Sep 17 21:01:58 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:36 2006 Subject: [egenix-users] mx.DateTime bogus warning: "float where int expected" In-Reply-To: <3F68930A.CD2E4C63@noaa.gov> References: <33436.199.169.240.132.1063814659.squirrel@svr1.turboweb.net> <3F68930A.CD2E4C63@noaa.gov> Message-ID: <3F68A196.6010907@lemburg.com> Jim Vickroy wrote: > I do not have an explanation, but the statement: > > dt = self.firstdate + self.mm * int(i) > > appears to be the source of this warning. The warning only appears the first > time the statement is executed; thereafter, no warning is issued. Right, that's a Python feature. The cause of the problem seems to be that DateTime() constructor expects integers as argument and that the code in RelativeDateTime can generate floats as a result of refitting the values into proper ranges. Try adding this snippet in DateTime.py before line 585: # Refit into proper ranges: if month < 1 or month > 12: month = month - 1 yeardelta, monthdelta = divmod(month, 12) year = year + yeardelta month = monthdelta + 1 # Make sure we have integers year = int(year) month = int(month) day = int(day) if self.weekday is None: return DateTime(year, month, 1) + \ DateTimeDelta(day-1,hour,minute,second) > python@sarcastic-horse.com wrote: > > >>Hi- >> >>I'm getting a "DeprecationWarning: integer argument expected, got float" >>warning with mx.DateTime and I can't figure out why. Can anyone help me >>out? >> >>This code: >> >>import mx.DateTime >> >>class xLabeller: >> def __init__(self, firstdate,fmt='%B, %Y'): >> self.firstdate = firstdate >> self.fmt = fmt >> self.mm = mx.DateTime.RelativeDateTime(months=1) >> def __call__(self, i): >> dt = self.firstdate + self.mm * int(i) >> return dt.Format(self.fmt) >> >>nov99 = mx.DateTime.Date(int(1999), int(11)) >> >>xl = xLabeller(nov99) >>print "xl2:" >>print xl(int(3)) >> >>Produces this warning: >> >> >>>>>================================ RESTART =========== >>>>> >> >>xl2: >>C:\Python23\lib\site-packages\mx\DateTime\DateTime.py:585: >>DeprecationWarning: integer argument expected, got float >> return DateTime(year, month, 1) + \ >>February, 2000 >> >>What is the story? I've wrapped every number in my program with int(). I >>can't figure out what's triggering the warning. >> >>And, even stranger, the whole thing works fine at the python shell: >> >> >>>>>import mx.DateTime >>>>>mm = mx.DateTime.RelativeDateTime(months=1) >>>>>nov99 >> >> >> >>>>>dt = nov99 + mm * 3 >>>>>dt.Format('%b, %y') >> >>'Feb, 00' >> >>What am I doing wrong? >> >>Thanks for the help. >> >>_______________________________________________________________________ >>eGenix.com User Mailing List http://www.egenix.com/ >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 17 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mmoum at woh.rr.com Thu Sep 25 20:49:48 2003 From: mmoum at woh.rr.com (Michael Moum) Date: Fri Mar 31 16:33:36 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 Message-ID: <3F737F1C.9030404@woh.rr.com> Hello all, I've just downloaded and installed mxBeeBase using the windows installer for Python2.3. I've notice the following problems: 1) FileLock.py contains references to os.symlink, as in Traceback (most recent call last): File "", line 1, in ? File "mx\BeeBase\BeeDict.py", line 641, in __init__ recover=recover) File "mx\BeeBase\BeeStorage.py", line 976, in __init__ apply(BeeStorage.__init__,(self,)+args,kws) File "mx\BeeBase\BeeStorage.py", line 180, in __init__ filelock.lock() File "mx\BeeBase\FileLock.py", line 116, in lock makelink=os.symlink AttributeError: 'module' object has no attribute 'symlink' symlink appears to be for Linux, not for Windows. Is there a known fix, or should I just hack my own? 2) Running BeeDict.py as a program, so the test cases get execute, and inserting the line d.commit() after the last entry and before the del d,s, I get the following error: >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for "test-BeeDict"... 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": ------------------------------------------------------------------------------- 'Petra' ------------------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, in ? d.commit() File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, in commit index[hashvalue] = address TypeError: record address must be an integer This also can be fixed by converting address to an integer. Has anyone else run into this, and is there an "official" fix for this, or do I roll my own again? Thanks in advance, Mike -- the Moum's (Mike, Dede, Suzanne, Jeff, Kristen) Tipp City, Ohio, USA Visit the Baha'i World web site at www.bahai.org Visit the U.S. Baha'i web site at www.us.bahai.org From nwingfield at che-llp.com Fri Sep 26 12:08:17 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Mar 31 16:33:36 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We are having trouble with mxODBC and Microsoft SQL Server 2000, when two or more people run the same query at the same time. This trouble is easily reproduced by opening two browser windows and loading a page that executes a lengthy SQL query in both windows simultaneously. Exhibit A shown below is the most common, but Exhibit B is not hard to reproduce under the same circumstances. Exhibits C and D are also fairly common, and though not directly SQL-related, suggest incomplete or corrupted recordsets. Sometimes one window will successfully load the page; sometimes neither will. Never do both windows successfully load the page simultaneously. I would appreciate any suggestions. EXHIBIT A Error Type: ProgrammingError Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt', 5911) EXHIBIT B Error Type: InterfaceError Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function sequence error', 4350) EXHIBIT C No input was provided for vendor_ids (this is a ZSQLMethod error) EXHIBIT D Error Type: IndexError Error Value: tuple index out of range Some environmental variables to consider: - We do not use stored procedures - This occurs with every permutation of connection pooling options, within both Zope and the Windows ODBC Administrator - This does not occur under ZODBCDA - Connected database: Microsoft SQL Server, 08.00.0194 - ODBC driver: SQLSRV32.DLL, 03.80.0194 From mal at lemburg.com Sat Sep 27 15:58:34 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:36 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F75897A.7010000@lemburg.com> nwingfield@che-llp.com wrote: > We are having trouble with mxODBC and Microsoft SQL Server 2000, when two > or more people run the same query at the same time. This trouble is easily > reproduced by opening two browser windows and loading a page that executes > a lengthy SQL query in both windows simultaneously. Exhibit A shown below > is the most common, but Exhibit B is not hard to reproduce under the same > circumstances. Exhibits C and D are also fairly common, and though not > directly SQL-related, suggest incomplete or corrupted recordsets. > Sometimes one window will successfully load the page; sometimes neither > will. Never do both windows successfully load the page simultaneously. I > would appreciate any suggestions. This seems to be related to a bug in the SQLDescribeParam API implementation of more recent MS SQL Server 2000 ODBC drivers: http://support.microsoft.com/default.aspx?scid=kb;en-us;321255 Upgrading to the latest SQL Server 2000 service pack should solve the problem according to MS. > EXHIBIT A > Error Type: ProgrammingError > Error Value: ('HY000', 0, '[Microsoft][ODBC SQL Server Driver]Connection is > busy with results for another hstmt', 5911) > > EXHIBIT B > Error Type: InterfaceError > Error Value: ('HY010', 0, '[Microsoft][ODBC SQL Server Driver]Function > sequence error', 4350) > > EXHIBIT C > No input was provided for vendor_ids (this is a ZSQLMethod error) > > EXHIBIT D > Error Type: IndexError > Error Value: tuple index out of range General note: please always provide complete tracebacks when reporting errors, e.g. exhibits C & D don't have enough information to provide proper support. > Some environmental variables to consider: > - We do not use stored procedures > - This occurs with every permutation of connection pooling options, within > both Zope and the Windows ODBC Administrator > - This does not occur under ZODBCDA This is because ZODBCDA always uses SQLExecDirect and does make use SQLDescribeParam at all. > - Connected database: Microsoft SQL Server, 08.00.0194 > - ODBC driver: SQLSRV32.DLL, 03.80.0194 -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at lemburg.com Sat Sep 27 16:04:15 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:36 2006 Subject: [egenix-users] mxBeeBase on WindowsXP with Python2.3 In-Reply-To: <3F737F1C.9030404@woh.rr.com> References: <3F737F1C.9030404@woh.rr.com> Message-ID: <3F758ACF.8040401@lemburg.com> Michael Moum wrote: > Hello all, > > I've just downloaded and installed mxBeeBase using the windows installer > for Python2.3. I've notice the following problems: These should be fixed in the most recent egenix-mx-base snapshot: http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2003-08-09.zip (It's a source package, so you'll need to compile it yourself.) > 1) FileLock.py contains references to os.symlink, as in > Traceback (most recent call last): > File "", line 1, in ? > File "mx\BeeBase\BeeDict.py", line 641, in __init__ > recover=recover) > File "mx\BeeBase\BeeStorage.py", line 976, in __init__ > apply(BeeStorage.__init__,(self,)+args,kws) > File "mx\BeeBase\BeeStorage.py", line 180, in __init__ > filelock.lock() > File "mx\BeeBase\FileLock.py", line 116, in lock > makelink=os.symlink > AttributeError: 'module' object has no attribute 'symlink' > > symlink appears to be for Linux, not for Windows. Is there a known fix, > or should I just hack my own? > > 2) Running BeeDict.py as a program, so the test cases get execute, and > inserting the line d.commit() after the last entry and before the del > d,s, I get the following error: > >>> 2000 2003-09-25 19:46:12.71 [p6100] Committing all changes for > "test-BeeDict"... > 2000 2003-09-25 19:46:12.71 [p6100] writing key "Thorsten": > ------------------------------------------------------------------------------- > > 'Petra' > ------------------------------------------------------------------------------- > > Traceback (most recent call last): > File > "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 1259, > in ? > d.commit() > File "C:\Python23\Lib\site-packages\mx\BeeBase\BeeDict.py", line 764, > in commit > index[hashvalue] = address > TypeError: record address must be an integer > > This also can be fixed by converting address to an integer. Has anyone > else run into this, and is there an "official" fix for this, or do I > roll my own again? > > Thanks in advance, > Mike -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nwingfield at che-llp.com Mon Sep 29 17:28:12 2003 From: nwingfield at che-llp.com (nwingfield@che-llp.com) Date: Fri Mar 31 16:33:36 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 Message-ID: We have achieved a temporary working solution by the following means: 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply with SQL 92 standards 2. Replaced Microsoft's SQL Server driver with an alternative from DataDirect 3. Checked "Use Auto-Commit" on the mxODBC properties tab 4. Reduced connection pool size to 1 on the mxODBC properties tab 5. Disabled connection pooling in ODBC setup on the Windows server itself The service pack had no effect on the problem. There are two problems with this setup. 1. We do not wish to use auto-commit 2. We must be able to increase the connection pool size to a greater number However, if we disable "Use Auto-Commit," the following error is prone to occur: ... Module Script (Python), line 4, in getPrevQuantities - - Line 4 Module Shared.DC.ZRDB.DA, line 428, in __call__ Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback Module Products.mxODBCZopeDA.ZopeDA, line 1329, in Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', 5911) Furthermore, when using a connection size greater than 1, we found that lock escalation in SQL Server would prevent even a single user from executing certain pages. Zope would spin indefinitely, never rendering the page because of competing database locks. Perhaps this could be remedied by revisiting our design? From mal at lemburg.com Tue Sep 30 21:42:19 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:37 2006 Subject: [egenix-users] mxODBC and Microsoft SQL Server 2000 In-Reply-To: References: Message-ID: <3F79CE8B.2010303@lemburg.com> nwingfield@che-llp.com wrote: > We have achieved a temporary working solution by the following means: > 1. Enabled "Close cursor on COMMIT" setting in SQL Server setup to comply > with SQL 92 standards > 2. Replaced Microsoft's SQL Server driver with an alternative from > DataDirect > 3. Checked "Use Auto-Commit" on the mxODBC properties tab > 4. Reduced connection pool size to 1 on the mxODBC properties tab > 5. Disabled connection pooling in ODBC setup on the Windows server itself > > The service pack had no effect on the problem. > > There are two problems with this setup. > 1. We do not wish to use auto-commit > 2. We must be able to increase the connection pool size to a greater > number That's understandable, however, the fact that the service pack did not solve the problems suggests that there may some other cause preventing multiple statements from working at the same time in your case (you are the first one to have reported such a problem). Could you give more detail about the kind of database design your are using (if needed, in private mail) ? E.g. usage of special data types, two connections introducing implicit row level locks, etc. Please also provide information on how you access the Zope DA connections, i.e. only via Z SQL Methods, directly, or using mix of both. > However, if we disable "Use Auto-Commit," the following error is prone to > occur: > ... > Module Script (Python), line 4, in getPrevQuantities > - /earthfare/customers/ath_fs> > - Line 4 > Module Shared.DC.ZRDB.DA, line 428, in __call__ > Module Products.mxODBCZopeDA.ZopeDA, line 1330, in query > Module Products.mxODBCZopeDA.ZopeDA, line 1214, in run_cursor_callback > Module Products.mxODBCZopeDA.ZopeDA, line 1329, in > Module Products.mxODBCZopeDA.ZopeDA, line 884, in errorhandler > ProgrammingError: ('HY000', 0, '[DataDirect][ODBC SQL Server driver]You > cannot have more than one statement active, when SQL_AUTOCOMMIT is false.', > 5911) > > Furthermore, when using a connection size greater than 1, we found that > lock escalation in SQL Server would prevent even a single user from > executing certain pages. Zope would spin indefinitely, never rendering the > page because of competing database locks. Perhaps this could be remedied > by revisiting our design? From your descriptions it seems that you have long running SQL queries that are locking each other via implicit locks. These could be explicit in the way your application works or could be introduced by triggers you have on the tables. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Sep 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::